package com.feijiang.mapper;

import com.feijiang.entity.Experiment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2021-12-28
 */
public interface ExperimentMapper extends BaseMapper<Experiment> {
  @Select("select * from tb_experiment limit #{pageNum}, #{pageSize}")
  List<Experiment> list(@Param("pageSize") int pageSize, @Param("pageNum") int pageNum);

  @Select("SELECT * FROM `tb_experiment` where name like '%${keyword}%' or summary like '%${keyword}%'  or purpose like '%${keyword}%' ")
  List<Experiment> search(@Param("keyword") String keyword);
}
